<template>
  <div>
    <el-button type="primary" v-throttle="{ time: 1000, fn: clearStorage }">clearStorage</el-button>
  </div>
</template>

<script setup>
  import { useLocalStorage } from 'hooks/index.js'

  const localStorageExample = useLocalStorage(`localStorageExample`, `localStorageExample`, `localStorage`)
  const sessionStorageExample = useLocalStorage(`sessionStorageExample`, `sessionStorageExample`, `sessionStorage`)

  const clearStorage = () => {
    console.log(`11`)

    localStorageExample.clearValue()
    sessionStorageExample.clearValue()
  }
</script>

<style lang="scss" scoped></style>
